Browser = Ext.extend(Ext.app.Module, {
    id: 'browser-win',
	textField: new Ext.form.TextField({
		id: 'urlField',
	}),
    init: function(){
            this.launcher = {
                    text: 'Web Browser',
                    iconCls: 'icon-grid',
                    handler: this.createWindow,
                    scope: this
            }
    },

    createWindow: function() {
            var desktop = this.app.getDesktop();
            var win = desktop.getWindow('browser-win');
            if(!win){
                    win = desktop.createWindow({
                            id: 'browser-win',
                            title: 'Web Browser',
							tbar: new Ext.Toolbar( {
								items: [
									backButton = new Ext.Toolbar.Button({
										text: 'Back',
										width: 30,
										handler: function() {
											history.back(1);
										}
									}),
									'-',
									textField = new Ext.form.TextField( {
									} ),
									goButton = new Ext.Toolbar.Button( {
										text: 'Go',
										width: 45,
										handler: function() {
											Ext.get("ifr").set({ src: textField.getValue() });
										}
									} )
								]
							} ),
							html: '<iframe id="ifr" style="width: 100%; height: 100%; border: 0;" src="about: blank"></iframe>'
                    });
            }
			win.on('resize', function(comp, width, height) {
                textField.setSize(width - goButton.width - backButton.width - 15, textField.height );
            }, this );
			win.setSize(600, 300);
			win.show();
    }
});

